<%-- 
    Document   : gestionCliente
    Created on : 03-dic-2012, 21:48:03
    Author     : Juan escom
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        
        <script type="text/javascript" src="js/jquery_1.4.js"></script>
        
        <script type="text/javascript">
            $(document).ready(function(){
                $('#boton').click(function() {
                    $rfc = $("#rfc").val();                    
                        $.ajax({
                            url: 'ConsultarCliente',
                            type: "POST",
                            data: {rfc:$rfc},
                            error: function(){
                                alert("Data Error");},
                            success: function(data) 
                            {       
                                    $("#juan").html(data);
                                    $('#rfc').val("");
                                    $('#rfc').focus();
                            }
                        });
                });
            });
            
        function ventanaNueva(documento,ancho, alto)
        {	
            window.open(documento,'nuevaVentana','width=' + ancho + ', height=' + alto);
        }
        </script>
        
        
    </head>
    <body>
        <form id="Myform">
            <table id="table1" border="0">              
              <tr>
                <td align="left"><h1><font color="red">Gestión cliente</font></h1></td>
              </tr>
              <tr>
                <td align="left">*: Campo de texto obligatorio.<br><br></td>
              </tr>
              <tr>
                <td align="left">
                    <label for="rfc">R.F.C:*</label>
                    <input type="text" id="rfc" name="rfc"/>
                </td>                
                <td align="right">                    
                    <input type="button" id ="boton" value="B" />                    
                </td>                
                <td align="right">                    
                    <input type="button" id="nuevo" value="+" onclick="ventanaNueva('registrarCliente.jsp',600,535)"/>
                </td>                
              </tr>                            
	    </table>
	</form>
        <br>
        <div id="juan"></div>
    </body>
</html>
